#include "stdafx.h"
#include "TestSpwl.h"
#include "Spwl.h"

using namespace PDMS::PDMSFrame;

CPPUNIT_TEST_SUITE_REGISTRATION( TestSpwl );

TestSpwl::TestSpwl()
{
}


TestSpwl::~TestSpwl()
{
}

void TestSpwl::TestClone()
{
	UeDbObject* pSpwl = PDMSClassRegister::Instance()
		->CreateObject( UE_PDMSCLASS_REGKEY(Spwl) );
	CPPUNIT_ASSERT( pSpwl );
	CPPUNIT_ASSERT( pSpwl->Clone() );

}

void TestSpwl::TestIsLegalParent()
{
	UeDbObject* pSpwl = PDMSClassRegister::Instance()
		->CreateObject( UE_PDMSCLASS_REGKEY(Spwl) );
	UeDbObject* pObj = PDMSClassRegister::Instance()
		->CreateObject( UE_PDMSCLASS_REGKEY(World) );
	CPPUNIT_ASSERT( pSpwl );
	CPPUNIT_ASSERT( pObj);
	CPPUNIT_ASSERT( !pSpwl->IsLegalParent( pSpwl ) );
	CPPUNIT_ASSERT( pSpwl->IsLegalParent( pObj ) );
}	
